package com.qd.pay.domain;

import lombok.Data;
import lombok.experimental.Accessors;

import java.util.Map;

/**
 * @program: pay
 * @description:
 * @author: sjk
 * @create: 2019/10/17
 */
@Data
@Accessors(chain = true)
public class WxRespDTO {
    private String returnCode;
    private String returnMsg;
    private String resultCode;
    private String errCode;
    private String errCodeDes;

    public WxRespDTO(Map<String, String> params) {
        this.returnCode = params.get("return_code");
        this.returnMsg = params.get("return_msg");
        this.resultCode = params.get("result_code");
        this.errCode = params.get("err_code");
        this.errCodeDes = params.get("err_code_des");
    }

    public void freeData() {
        this.returnCode = null;
        this.returnMsg = null;
        this.resultCode = null;
        this.errCode = null;
        this.errCodeDes = null;
    }
}
